import { Controller, Get, Render } from '@nestjs/common';
import AppEntity from '../db/entity/app.entity';

@Controller('activity')
export class ActivityController {

    @Get()
    @Render('index')
    async index() {

        const entity = await AppEntity.find({
            take: 1,
            relations: ['file'],
            order: {id: -1},
        });
        return {data: entity};
    }
}
